<?php
abstract class ErrorMesage
{
	protected $_messageArray;
	
	protected $_outputString;

	public function get($errorName, $bind = null)
	{
		$this->_outputString = $this->_messageArray[$errorName];
		if (null !== $bind)
		{
			foreach ($bind as $key => $value)
			{
				$this->_outputString = str_replace(":$key", $value, $this->_outputString);
			}
		}
	}
	
	public function output()
	{
		echo $this->_outputString;
	}
}